package org.itworks.biodev.gui.panels;

import java.util.*;

import org.itworks.biodev.model.*;
import org.itworks.helpers.*;

public class MeetingsPanelModel extends Observable {

	private Vector<Meeting> meetings;
	private Vector<Customer> participants;
	
	public void setMeetingsList(Vector<Meeting> meetings) {
		this.meetings = meetings;
		this.setChanged();
		this.notifyObservers(new MVCNotification(MeetingsPanelView.FILL_MEETINGS_TABLE, meetings));
		this.clearChanged();
	}
	
	public Vector<Meeting> getMeetings() {
		return this.meetings;
	}

	public void setParticipantsList(Meeting meeting) {
		// TODO Auto-generated method stub
		try {
			this.participants = CustomerMeetingTable.getInstance().findParticipantsByMeeting(meeting);
			this.setChanged();
			this.notifyObservers(new MVCNotification(MeetingsPanelView.FILL_PARTICIPANTS_TABLE, this.participants));
			this.clearChanged();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
